
<%@page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>

<c:url var="urlForm" value="/movimentacao/incluir" />
<c:url var="urlMatricula" value="/movimentacao/buscar-contrato/" />
<input type="hidden" value="${urlMatricula}" id="url-buscar-matricula" />

<!-- Begin page content -->
<div class="container">
	<div class="page-header">
		<h3>Movimentações Incluir</h3>
	</div>

	<div class="alert alert-danger" id="painelErro">
		<span><strong>Erro:</strong><span id="mensagemErro">${errorMessage}</span> </span>
	</div>
		
	<form:form method="POST" class="form-horizontal" role="form"
		action="${urlForm}" id="formulario" modelAttribute="movimentacao">
		<div class="form-group">
			
			
			<c:if test="${exibirCombo}">
				<div class="form-group">
					<label for="inputMes" class="col-lg-1 control-label">Mês</label>
					<div class="col-lg-2">
						<form:select id="inputMes" class="form-control" path="mes">
							<option value="${null}">Selecione</option>
							<c:forEach var="mes" items="${mes}">
								<option value="${mes.codigo}">${mes.descricao}</option>
							</c:forEach>
						</form:select>
					</div>
				</div>
				<div class="form-group">
					<label for="inputAno" class="col-lg-1 control-label">Ano</label>
					<div class="col-lg-2">
						<form:input type="text" class="form-control" id="inputAno"
							placeholder="Digite o Ano" path="ano" />
					</div>
				</div>
			</c:if>
			<c:if test="${!exibirCombo}">
				<div class="form-group">
					<label class="col-lg-1 control-label">Mês/Ano</label>
					<div class="col-lg-2">
						${mes}/${ano}
						<form:hidden path="mes" />
						<form:hidden path="ano" />
					</div>
				</div>
			</c:if>
			
			
			
			
			<div class="form-group">
				<label for="inputMatricula" class="col-lg-1 control-label">Matricula</label>
				<div class="col-lg-2">
					<form:input type="text" class="form-control" id="inputMatricula"
						placeholder="Digite a Matrícula" path="contrato.matricula" />
				</div>
				<label for="inputNome" class="col-lg-2 control-label">Nome
					do servidor</label>
				<div class="col-lg-3">
					<form:input path="contrato.pessoa.nome" class="form-control" id="inputNome"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-lg-1 control-label"></label>
				<div class="col-lg-6">
					<a href="#" id="btn-avancar" class="btn btn-primary">Avançar</a>
				</div>
			</div>
		</div>
	</form:form>

	<script type="text/javascript"
		src="<c:url value="/resources/js/movimentacao/movimentacao_pre_incluir.js" />"></script>

</div>
